A multidimensional theory for electron trapping by a plasma wake generated in the bubble regime