Shaping of the output beam in a pulsed gas laser with an unstable resonator