Temporal variations of solar spectral line profiles induced by the 5-minute photospheric oscillation