Optical system for shaping the wavefront of the electric field of a light beam to be projected into a target volume, for realizing multiple -transversal plane illumination patterns along the optical axis (z) in a target volume, including: (i)- a first optical element which is a spatial light modulator operatively arranged to control light distribution, through phase and/or amplitude modulation of the electric field of the light beam, forming 2D illumination patterns in each one of the multiple transverse planes (51, 52, 53) in the target volume in regard to an optical axis (z), the first spatial light modulator being operatively divided in a number of first independent regions (21, 22), each of these first independent regions (21, 22) being used to generate a 2D illumination pattern (511, 521) focused onto at least one intermediate optical element, (ii)- the at least one intermediate optical element (4, 4a, 4b) being a dispersive grating for performing temporal focusing of the light beam on each of the multiple transverse planes (51, 52, 53), and being located, on the optical axis (z), after the first optical element on a trajectory of the light beam where an image of the 2D illumination patterns is formed, for modulating the phase and/or the amplitude of the electric field of the light beam, (iii)-and a second optical element being a spatial light modulator for modulating the phase of the electric field of the input light beam and operatively arranged to control the axial position of each of the multiple transverse planes (51, 52, 53) in the target volume along the optical axis (z), the second optical element being situated on the optical axis (z) after the at least one intermediate optical element on the trajectory of the light beam at a plane conjugated to the one of the intermediate optical element (4, 4a, 4b), the second optical element being operatively arranged to be divided in a number of second independent regions (31, 32) equal to the number of first independent regions (21, 22), each second independent region (31, 32) comprising a lens-phase profile controlling the axial position in the target volume of the corresponding 2D illumination patterns (511, 521) generated by the first spatial light modulator in the transverse planes (51, 52), each of the multiple transverse planes (51, 52) being displaced independently of each other in regard to the optical axis (z) in the target volume, the number of first independent regions (21, 22) being equivalent to the number of transverse planes (51, 52), the first independent regions and the second independent regions (21, 22, 31, 32) are tiled parallel to the orientation of the dispersive grating lines. (i)- a first optical element which is a spatial light modulator operatively arranged to control light distribution, through phase and/or amplitude modulation of the electric field of the light beam, forming 2D illumination patterns in each one of the multiple transverse planes (51, 52, 53) in the target volume in regard to an optical axis (z), the first spatial light modulator being operatively divided in a number of first independent regions (21, 22), each of these first independent regions (21, 22) being used to generate a 2D illumination pattern (511, 521) focused onto at least one intermediate optical element, (ii)- the at least one intermediate optical element (4, 4a, 4b) being a dispersive grating for performing temporal focusing of the light beam on each of the multiple transverse planes (51, 52, 53), and being located, on the optical axis (z), after the first optical element on a trajectory of the light beam where an image of the 2D illumination patterns is formed, for modulating the phase and/or the amplitude of the electric field of the light beam, (iii)-and a second optical element being a spatial light modulator for modulating the phase of the electric field of the input light beam and operatively arranged to control the axial position of each of the multiple transverse planes (51, 52, 53) in the target volume along the optical axis (z), the second optical element being situated on the optical axis (z) after the at least one intermediate optical element on the trajectory of the light beam at a plane conjugated to the one of the intermediate optical element (4, 4a, 4b), the second optical element being operatively arranged to be divided in a number of second independent regions (31, 32) equal to the number of first independent regions (21, 22), each second independent region (31, 32) comprising a lens-phase profile controlling the axial position in the target volume of the corresponding 2D illumination patterns (511, 521) generated by the first spatial light modulator in the transverse planes (51, 52), each of the multiple transverse planes (51, 52) being displaced independently of each other in regard to the optical axis (z) in the target volume, the number of first independent regions (21, 22) being equivalent to the number of transverse planes (51, 52), the first independent regions and the second independent regions (21, 22, 31, 32) are tiled parallel to the orientation of the dispersive grating lines.