Learning Policies for Automated Racing Using Vehicle Model Gradients