Learning to Optimize in Model Predictive Control