Quantum control allows us to address the problem of engineering quantum dynamics for special purposes. While recently the field of quantum batteries has attracted much attention, optimization of their charging has not benefited from the quantum control methods. Here we fill this gap by using an optimization method. We apply for the first time the convergent iterative method for the control of the population of a bipartite quantum system in two cases, starting with a qubit-qubit case. The quantum charger-battery system is considered here, where the energy is pumped into the charger by an external classical electromagnetic field. Secondly, we systematically extend our investigation to a second case involving two harmonic oscillators in the Gaussian regime, presenting an original formulation of the method. In both cases, the charger is considered to be an open dissipative system, as its interaction with the drive may require a more pronounced exposure to general interaction with environment. A key consideration in our optimization strategy is the practical concern of turning the charging external field on and off. We find that optimizing the pulse shape yields a substantial enhancement in both the power and efficiency of the charging process compared to a sinusoidal drive. The harmonic oscillator configuration of quantum batteries is particularly intriguing, as the optimal driving pulse remains effective regardless of the environmental temperature. This study introduces a novel approach to quantum battery charging optimization, opening avenues for enhanced performance in real-world applications.