Semiconductor quantum dots are ideal candidates for quantum information applications in solid-state technology. However, advanced theoretical and experimental tools are required to coherently control, for example, the electronic charge in these systems. Here we demonstrate how quantum optimal control theory provides a powerful way to manipulate the electronic structure of coupled quantum dots with an extremely high fidelity. As alternative control fields we apply both laser pulses as well as electric gates, respectively. We focus on double and triple quantum dots containing a single electron or two electrons interacting via Coulomb repulsion. In the two-electron situation we also briefly demonstrate the challenges of timedependent density-functional theory within the adiabatic local-density approximation to produce comparable results with the numerically exact approach.