A new approach to constrained optimal control problems