American attitudes regarding race in the late 1800s and early 1900s served as a motivation and justification for overseas expansion. If we look back to the 1840s and America's era of westward expansion across North America, we see the appearance of the term "manifest destiny." Manifest destiny was the belief that it was God's will for the United States to expand across the continent and to spread American values to those they encountered along the way. With the idea of manifest destiny came the belief that American values were superior to those of natives. This mentality carried over into the Age of American Imperialism on which this question focuses.
In the late 1800s and early 1900s, there was a belief in the United States of Anglo-Saxon superiority. The belief involved the idea that English-speaking peoples were superior to others. In 1885, Josiah Strong published a book titled Our Country. In Our Country, he argued that not only were Anglo-Saxon peoples superior to others, but that it was God's will for them to dominate the globe. With that, he felt that they also had a responsibility to spread Christianity around the globe and thus serve to "civilize" non-Christians and non–Anglo-Saxons in the process.
The ethnocentrism and beliefs of racial superiority that existed in the United States at the end of the nineteenth and early twentieth centuries served as motivation and justification for colonial expansion overseas. These beliefs removed guilt from Americans, and even created a feeling that what they were doing was in fact beneficial to those they colonized.