The aim of this work is to study, from an intrinsic and geometric point of view, second-order constrained variational problems on Lie algebroids, that is, optimization problems defined by a cost function which depends on higher-order derivatives of admissible curves on a Lie algebroid. Extending the classical Skinner and Rusk formalism for the mechanics in the context of Lie algebroids, for second-order constrained mechanical systems, we derive the corresponding dynamical equations. We find a symplectic Lie subalgebroid where, under some mild regularity conditions, the second-order constrained variational problem, seen as a presymplectic Hamiltonian system, has a unique solution. We study the relationship of this formalism with the second-order constrained Euler-Poincaré and Lagrange-Poincaré equations, among others. Our study is applied to the optimal control of mechanical systems.