It's typically not wise to assign employees to working groups based on race, sex or any other protected characteristic. But you won't always be liable for discrimination in such cases. Just make sure you have a valid business-based reason for doing so, and then apply that policy consistently to affected employees.
Recent case: Sharon Davis, a black police officer in Newark, N.J., claimed the city discriminated against her by partnering her with another black officer. The police department's standard policy was to pair officers by race and national origin, ostensibly to respond to community needs while on patrol. Davis sued, but the trial court dismissed the case, saying the city's patrol policy affected every officer and that Davis needed to show the assignment somehow affected her employment. (Davis v. City of Newark, No. 04-5317, DC NJ, 2006)