US President Donald Trump has vowed "to act with urgent resolve" following two shootings in Ohio and El Paso which killed at least 29 people.