Controlled wake field acceleration via laser pulse shaping