There are 2 ways to do this: do it yourself, or let the AI do it for you!
First off, head to the Multiplayer tab and choose Ranked. You'll need to do 5 placement races in order to get a safety rating, and then you can use the following races to increase that rating until you get an A. I would suggest 5 lap races for the quickest turnaround.
To increase your rating, you need to finsh a race with 0 penalties. You can have up to 2 warnings per race without affecting your rating, but a penalty will lower it. The problem is, if somebody rams in to the back of you, you will also get a warning despite it not being your fault. Corner cutting is also set to Strict which leaves very little leeway for running wide.
If you are doing this yourself, you need to be cautious of other cars around you and ensure you take a clean line throughout. I would suggest qualifying very slowly, and hanging at the back of the field. It is boring, but the safest way to have a clean race. Always be cautious at turn 1 off the start, slow down and let the melee subside before continuing!
The easiest and safest way to get your A rating is to let the AI race for you. To do this, start up qualifying and as soon as you are in control of your car, hit pause. In the race, you will need to perform a manual start, and then hit pause. The AI will now take control of your car and complete a safe race for you, albeit a slow one. So far, I have not had the AI concede a single warning or penalty whilst in control.
If you use this method, you should place with a mid-B rating. It will then take 3-4 races to get to 100% (you will see the rating increase in the post-race screens), and 3 more clean races after that to be bumped up to an A. One final race should pop the achievement.