Found a fix for the error myself. Basically everytime i run the game when it gets to the 3D part of it game goes black and there's a directx error.
What i did to fix it in my case was:
1. Go here: C:\Users\Your Username\Documents\Need for Speed(TM) Payback\settings
2. Open PROFILEOPTIONS_profile with Notepad
3. Hit Ctrl+F and write postprocess
4. It will look something like this "GstRender.PostProcessQuality 3" , change it to "GstRender.PostProcessQuality 2" (Don't put space after the number, just correct it)
5. Hit Ctrl+S and close it
6. When you enter ingame(hopefully it didn't crash this time) go to the video settings, put it on custom and maxout everything except Post Processing, leave that at High.
The conclusion for my case was the PostProcessing quality set at ultra crashes the game with the DX Error.
P.S I'm using a GTX 1080