We consider an optimal control problem with an 1D singularly perturbed differential state equation. For solving such problems one uses the enhanced system of the state equation and its adjoint form. Thus, we obtain a system of two convection-diffusion equations. Using linear finite elements on adapted grids we treat the effects of two layers arising at different boundaries of the domain. We proof uniform error estimates for this method on meshes of Shishkin type. We present numerical results supporting our analysis.