Can I get a hysterectomy because there is a high risk of ovarian cancer in my family?

Sometimes. Usually this is only considered if the patient has a known genetic predisposition, such as hereditary breast and ovarian cancer syndrome (associated with brca1 and brca2). Talk to your doctor to see if your family history meets the criteria for testing for an inherited cancer syndrome. Note that these syndromes only make up a small fraction of the cancer diagnosed here.
Yes. You need to have a genetic screening done by your doctor or a genetic counsellor to decide how high your risk is and if you would benefit from a risk reducing hysterectomy and removal of the tubes and ovaries. This should be done as soon as possible.