The House of Representatives has condemned as racist comments by the US president about four congresswomen.