This is a very difficult issue as there is a very difficult balancing act here between the need to shield a rape victim from further humiliation and emotional harm and the need to ensure that we are not convicting men of a very significant crime without ensuring that they are truly guilty.
That said, the first thing that could be done would be to make rape shield laws more powerful. As it is, rape shield laws generally have a number of ways that defense lawyers can get around them. It is typically possible for defense lawyers to question women about their sexual histories on a variety of pretexts. Closing these loopholes would be an important step in protecting rape victims.
A second possible protection would be a set up in which the woman did not have to see the accused rapist. It is true that defendants have the right to confront their accusers, but that right is satisfied through the ability of the defendant’s lawyer to see the victim as she testifies. We could easily set up a system in which the defendant could see and hear the victim and could communicate with his lawyer, but in which the victim would be spared the pain of having to see her assailant as she testifies.