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