On the time-dependent radiative transfer in photospheric plasmas. I. The analytical approach