An initial value boundary problem for system of diffusion equations with delay arguments and dynamic nonlinear boundary conditions is considered. The problem describes evolution of the carrier density and the radiation density in the semiconductor laser or laser diodes with "memory" and with feedback. It is shown that the boundary problem can be reduced to a system of difference equations with continuous time. For large times, solutions of these equations tend to piecewise constant asymptotic periodic wave functions which represent chain of shock waves with finite or infinite points of discontinuities on a period. Applications to the optical systems with linear media and nonlinear surface optical properties with feedback have been done. The results are compared with the experiment.