Is sex safe during first trimester?

I'm 8 weeks pregnant and craving sex. Husband and I haven't done it since finding out. I have a history with multiple miscarriages so I'm afraid of damaging the baby. My doc has never told me not to have sex. I just read something on the internet that sex and orgasms can cause a miscarriage. You mean I can't even masturbate? Has anyone asked their doc about sex during first trimester?