An optimisation approach is presented for the problem of reconstructing the permittivity and conductivity profiles of a dielectric slab from the reflected and transmitted field data. The problem is treated as an optimal control problem where the norm of the difference of measured and calculated boundary data is minimised subject to the state equation governing the system. The original constrained optimisation problem is reduced to the evaluation of stationary points of an augmented functional which is obtained by the method of Lagrange multipliers. To find the necessary conditions for optimality, a variational approach is used which leads to a coupled system of four equations. The first two of these are differential equations named as state and costate equations, and the remaining two expressions are obtained by equating the gradients of the augmented functional, with respect to the permittivity and conductivity, to zero. Profile reconstruction is carried out by descent methods. At every iteration the state and costate equations are solved by the time domain finite element method. New estimates for the permittivity and conductivity profiles are obtained by a one dimensional search in a suitable descent direction.