An apparatus comprising a burst-mode laser comprising an active layer and configured to emit an optical signal during a burst period, wherein a temperature change of the burst-mode laser causes the optical signal to shift in wavelength, and a heater thermally coupled to the active layer and configured to reduce a wavelength shift of the optical signal during the burst period by applying heat to the active layer based on timing of the burst period.