Refer to this QA from IslamQA.info as well as this one about evidence for rape in Shariah.
In short, rape may be punished under the following:
The evidence for Zina is 4 witnessesses, a confession or a clear proof (e.g pregnancy).
The evidence for Qisas \ Diyat is two witnesses or an oath with corroborating evidence.
The evidence for Harabah is two witnesses.
The evidence for Tazeer is not prescribed, the judge will decide based on the evidence he has,
There is a hadith about a rape case in the time of the Prophet(p.b.u.h), it involves an eventual confession, but it is not clear what evidence the Prophet considered before the confession:
"A women went out during the time of the Prophet (ﷺ) to go to Salat,
but she was caught by a man and he had relations with her, so she
screamed and he left. Then a man came across her and she said: 'That
man has done this and that to me', then she came across a group of
Emigrants (Muhajirin) and she said: 'That man did this and that to
me.' They went to get the man she thought had relations with her, and
they brought him to her. She said: 'Yes, that's him.' So they brought
him to the Messenger of Allah (ﷺ), and when he ordered that he be
stoned, the man who had relations with her, said: 'O Messenger of
Allah, I am the one who had relations with her.' So he said to her:
'Go, for Allah has forgiven you.' Then he said some nice words to the
man (who was brought). And he said to the man who had relations with
her: 'Stone him.' Then he said: 'He has repented a repentance that, if
the inhabitants of Al-Madinah had repented with, it would have been
accepted from them.'"
[Tirmizi and Sunan Abu Daud]
A case of rape that happened in the caliphate of Umar(p.b.u.h), evidence is not mentioned:
"A governmental male-slave tried to seduce a slave-girl from the
Khumus of the war booty till he deflowered her by force against her
will; therefore 'Umar flogged him according to the law, and exiled
him, but he did not flog the female slave because the male-slave had
committed illegal sexual intercourse by force, against her will."
Az-Zuhri said regarding a virgin slave-girl raped by a free man: The
judge has to fine the adulterer as much money as is equal to the price
of the female slave and the adulterer has to be flogged (according to
the Islamic Law); but if the slave woman is a matron, then, according
to the verdict of the Imam, the adulterer is not fined but he has to
receive the legal punishment (according to the Islamic Law). [Saheeh
Bukhari]
There is a story about Ali(p.b.u.h) where a woman accused a man of rape, presenting a semen stained cloth as evidence (it was found to be forged).
It is reported that a woman desired a young man and she tried to
seduce him but the young man refused. She went away and got an egg.
She put the white (of the egg) on her dress. Then she began to make
accusations against the young man and had him brought before the
Commander of the faithful, peace be on him. She claimed: "This young
man has treated me shamefully. He has raped me."
She took her dress and showed the white (on it) from the egg, saying: "This is his semen on my dress." The young man began to cry, pleading and swearing his
innocence from her accusations. "Order someone to heat water until it
is very hot," the Commander of the faithful, peace be on him, told
Qanbar. "Then bring it to me while it is still like that." The water
was brought and he ordered it to be thrown on the woman's dress. They
threw it on it and the water collected up the white of the egg and
they came together. He ordered it to be taken and given to two of his
followers. He said: "Taste it and spit it out."
They tasted it and found that it (tasted like) egg. He ordered the
young man to be freed and the woman to be flogged as a punishment for
her false accusation.
[Kitab Al Irshad p.96]