Assuming the shift time remains about the same, and the speed loss also remains small (which it should - I don't think a slight uphill gradient will lose you more than a couple of mph compared to a level shift), then the red light remains the best time to change. It comes on when you have more wheel torque in the next gear than the current gear, and that's even more critical up hills. By the time you've reacted to the light you'll be shifting at the right time. Trying to play the difference by ear will almost certainly result in less wheel torque, less tractive effort, less acceleration, and slower laptimes. Slightly.