We present the use of a nonlinear optimization scheme called generalized simulated annealing to invert seismic reflection times for velocities, reflector depths, and lengths. A finite-difference solution of the eikonal equation computes reflection traveltimes through the velocity model and avoids ray tracing. We test the optimization scheme on synthetic models and compare it with results from a linearized inversion. The synthetic tests illustrate that, unlike linear inversion schemes, the results obtained by the optimization scheme are independent of the initial model. The annealing method has the ability to produce a suite of models that satisfy the data equally well. We make use of this property to determine the uncertainties associated with the model parameters obtained. Synthetic examples demonstrate that allowing the reflector length to vary, along with its position, helps the optimization process obtain a better solution. We put this to use in imaging the Garlock fault, whose geometry at depth is poorly known. We use reflection times picked from shot gathers recorded along COCORP Mojave Line 5 to invert for the Garlock fault and velocities within the Cantil Basin below Fremont Valley, California. The velocities within the basin obtained by our optimization scheme are consistent with earlier studies, though our results suggest that the basin might extend 1-2 km further south. The reconstructed reflector seems to suggest shallowing of the dip of the Garlock fault at depth.