Sex and pregnancy

Can I have sex while almost 5 weeks pregnant? If so is there a right or wrong way?