Optimal control for the quantum simulation of nuclear dynamics