We analyze in detail the so-called pushing gate for trapped ions, introducing a time dependent harmonic approximation for the external motion. We show how to extract the average fidelity for the gate from the resulting semi-classical simulations. We characterize and quantify precisely all types of errors coming from the quantum dynamics and reveal for the first time that slight nonlinearities in the ion-pushing force can have a dramatic effect on the adiabaticity of gate operation. By means of quantum optimal control techniques, we show how to suppress each of the resulting gate errors in order to reach a high fidelity compatible with scalable fault-tolerant quantum computing.