I shift in sprints all the time. Just click the shift up button at 4 o clock in the pedal rotation, then it will shift at 6 o clock, where you really aren't putting a lot of power on the pedal, so it will shift just fine.
EDIT: I see cdr has already said this. Call it an elaboration.