On Saturday, a gunman killed 20 people at a Walmart store in El Paso, Texas, in what officials said appeared to be a racially-motivated hate crime.
Later, another gunman in Dayton, Ohio, killed nine people. Dozens were also wounded in both shootings.
Addressing the nation on Monday, Trump called the El Paso gunman a "wicked man" and urged the country to condemn white supremacy.
"The shooter in El Paso posted a manifesto online consumed by racist hate. In one voice, our nation must condemn racism, bigotry and white supremacy."
The President, however, stopped short of acknowledging his own divisive and racist rhetoric.
Officials said the El Paso shooter may face hate crime charges after the police found a racist, anti-immigrant document they believe was written by the 21-year-old white male suspect.
The four-page document posted online espoused white nationalist and racist views. It railed against immigrants and Hispanics, blaming immigrants and first-generation Americans for taking away jobs and for the blending of cultures in the US.
Trump called the weekend shooting attacks "domestic terrorism," adding that he had called on the Federal Bureau of Investigation to devote further resources to preventing further attacks.
He said the Internet "provided a dangerous avenue to radicalize disturbed minds and perform demented acts".
"We must shine a light on the dark recesses of the internet and stop mass murderers before they start," he added.
Trump said during his White House statement that he was "directing the Department of Justice to propose legislation ensuring that those who commit hate crimes and mass murders face the death penalty."
He added that capital punishment in these cases should be "delivered quickly, decisively, and without years of needless delay".
Earlier in the day, the President called on lawmakers to pass legislation requiring strong background checks for gun users following the shootings.
Trump said the victims' deaths could not be "in vain" and called on both Republicans and Democrats to take steps to require further screenings for gun buyers.
"We cannot let those killed in El Paso, Texas, and Dayton, Ohio, die in vain. Likewise for those so seriously wounded. We can never forget them, and those many who came before them," Trump tweeted.
The President also suggested tying immigration reform to strengthening background checks.
"Republicans and Democrats must come together and get strong background checks, perhaps marrying this legislation with desperately needed immigration reform. We must have something good, if not great, come out of these two tragic events!"
Trump also suggested that the media was responsible for the scourge of mass shootings and "the anger and rage that has built up over many years".
( With inputs from IANS )