Theory of line shape of optical absorption and emission spectra in molecular crystals