An optimization approach is presented for the problem of constructing the time-dependent voltage waveform at the input terminals of a dipole antenna such that the radiated electric field waveform at the far zone is equal to a predetermined function of time. This problem is treated as an optimal control problem where the control is the voltage at the input terminals of the dipole antenna and the functional to be minimized is a suitable norm of the difference of the required and calculated far zone electric field amplitudes. The feed voltage and the current induced on the antenna are related by Pocklington's integro-differential equation, which will be called the state equation throughout this paper. In addition, the current induced on the antenna is related to the far zone electric field by an integral expression. The problem is formulated as a constrained optimization problem where the constraint is Pocklington's equation. Using the method of Lagrange multipliers we obtain the augmented functional, and the problem is reduced to finding the stationary points of the augmented functional. A variational approach is used to find the conditions for optimality, yielding the costate equation which is the adjoint of Pocklington's integro-differential equation. The problem is solved by the steepest descent method where the state and costate equations are solved by the time domain finite element method at each iteration step. The one-dimensional search at each step is carried out in the direction of the negative gradient with respect to the input voltage. A suitable stopping criterion is chosen to terminate the iterations. Numerical results show a close match between required and calculated waveforms.