Can you prevent/treat head twitches/shakes?

Yes. Depending on cause of symptoms, medications may be able to control your symptoms.
Consider treatment. Don't think you can prevent, but can treat. One of the most common reasons for head shaking is essential tremor. This can be fairly severe (think katharine hepburn), but for most it is much milder. There are a fair number of medications to reduce this symptom.