The ballistic optimization of the L1-L2 and L2-L1 missions in the Earth-Moon system using electric propulsion is considered. The motion control is studied using the Fedorenko's successful linearization method to estimate the derivatives and the gradient method to optimize the control laws. The transfers are designed in frames of the restricted circular three-body problem. The mathematical model of the missions is described within the barycentric system of coordinates. The perturbation from the Earth, the Moon and the Sun are taking into account. The impact factor of the shaded areas, produced by the Earth and the Moon, is also accounted for. As for the results, the optimization of the optimal control laws and corresponding trajectories were obtained.