An embodiment of a scanning optical system comprises: an optical source providing a beam of pulsed light of ultra-short pulse duration; a deflector for deflecting the beam through a scan angle; a lens system including a focusing objective for focusing the deflected beam; a dispersion compensating device for reducing dispersion-related distortion of a pulse of the beam by the lens system, the dispersion compensating device including a deformable, dispersive mirror and an actuator device for the mirror; and a controller for controlling the actuator device to change a shape of the mirror in accordance with the scan angle.