First Integrals and Closed-form Solutions of Some Singular Optimal Control Problems