Neural optimal feedback control with local learning rules