We present a digital spectral shaping technique to reduce the sidelobes (ringing) of the axial point-spread function in optical coherence tomography for non-Gaussian-shaped source spectra. The spectra of two superluminescent diodes were combined to generate a spectrum with significant modulation. Images of onion cells demonstrate the improved image quality in a turbid biological sample. A quantitative analysis of the accompanying penalty in signal-to-noise ratio is given.