Sex during EARLY pregnancy

Is sex during early pregnancy (4-6 weeks) safe? I've had miscarriages and it scares me to have sex this early because the baby is still in its development stages. Has anyone ever gotten the okay from a doctor?