US President Donald Trump has signed an executive order that prevents transgender women from competing in female categories of sports.