Laser pulse shaping for high gradient accelerators