We propose an adaptive technique to design the spectrum of an orthogonal frequency division multiplexing (OFDM) waveform to improve the radar's wideband ambiguity function (WAF). The adaptive OFDM signal yields a better auto-correlation function (ACF) that results into an improved delay (range) resolution for the radar system. First, we develop a mutlicarrier OFDM signal model and the corresponding WAF at the output of the matched filter, emphasizing that the received signal depends on the scattering parameters of the target. Then, we devise an optimization procedure to select the OFDM waveform such that the volume of the corresponding WAF best approximates the volume of a desired ambiguity function. We demonstrate the improvement in the resulting ambiguity function, along with the associated ACF, through numerical examples. We find that the optimization algorithm puts more signal energy at subcarriers in which the target response is weaker.