Optical line spectra of tidal disruption events from reprocessing in optically thick outflows