Constipation pain

6 weeks pregnant and having bad stomach pains that’s feel like trapped gas and constipation. Can I take a fiber supplement?