FIT3D: Fitting optical spectra