Extremely interesting paper on this subject by the amazing John Tooby and Leda Cosmides (as well as Robert Kurzban). Here is the abstract:

Can race be erased? Coalitional computation and social categorization. Previous studies have established that people encode the race of each individual they encounter, and do so via computational processes that appear to be both automatic and mandatory. If true, this conclusion would be important, because categorizing others by their race is a precondition for treating them differently according to race. Here we report experiments, using unobtrusive measures, showing that categorizing individuals by race is not inevitable, and supporting an alternative hypothesis: that encoding by race is instead a reversible byproduct of cognitive machinery that evolved to detect coalitional alliances. The results show that subjects encode coalitional affiliations as a normal part of person representation. More importantly, when cues of coalitional affiliation no longer track or correspond to race, subjects markedly reduce the extent to which they categorize others by race, and indeed may cease doing so entirely. Despite a lifetime’s experience of race as a predictor of social alliance, less than 4 minutes of exposure to an alternate social world was enough to deflate the tendency to categorize by race. These results suggest that racism may be a volatile and eradicable construct that persists only so long as it is actively maintained through being linked to parallel systems of social alliance.