I suspect, since it happens in the Safe mode, that you have a hardware problem.
Since it is intermittent, my best guess is RAM.
How many RAM strips do you have?
If you have more than one, recommend removing all but one strip.
Remove and replace each strip until each strip is tested.
Each time boot into the Safe mode so only Microsoft default drivers are loaded.