Stabilizability in optimal control