Yes, but if you do sort students by academic achievement, you will send a smaller fraction of blacks and Hispanics to academic high schools than whites, and a smaller fraction of whites than Asians, since there are differences in academic achievement by race. I say so be it, but currently many people assume that disparate outcomes prove racism.
If it's based on ability, it should not matter what percentage of advanced students are white, black, asian, or other. All that matters is that if you're good enough, you get in.