Tawaf (circumambulation of the Ka‘bah) when one is uncertain about one’s state of purity
Question

Is it valid to perform tawaf al-wadaa‘ (farewell tawaf) when I am not certain as to whether I am in a state of purity? Praise be to Allah, I performed the obligatory Hajj for the first time this year, but I am not sure about one of the rituals, namely the farewell tawaf. I did the farewell tawaf on the Thursday, but I had been sleeping in the Haram since Wednesday. When I went to sleep I was in a state of purity, praise be to Allah, but when I woke up at dawn on Thursday and went to do wudu, I was not sure whether I was junub (in a state of major impurity) or not, because a very small amount of maniy (semen) may have come out, but I could not be sure. I could not be certain, hence I checked carefully so that I could be certain, to the extent that I checked the private part itself and not just the garment – I apologise for the expression – and I thought that there was nothing there, but I found there was some semen on my garment, although I am not certain about that either, because it may have been an old mark on the garment. The point is that I did not do ghusl; I only did wudu and I prayed Fajr and did the farewell tawaf, and I went back to Riyadh, where I work. Is the fact that I did not do ghusl in order to be on the safe side regarded as neglect of my religious duty and bad etiquette towards Allah? Should I have taken a new garment with me to do ghusl after waking up – whether I was junub or not – especially since this often happens to me with regard to janaabah. What is the ruling of the validity of my Hajj?
Praise be to Allah.Firstly: 
Tawaf without being in a state of purity is a topic concerning which there is a difference of opinion among the fuqaha’. The view of the majority of scholars is that tawaf without wudu is invalid. 
This has been discussed previously in the answer to question no. 34695
Secondly: 
What happened in your case of uncertainty as to whether you were junub or not does not affect anything, because you are not certain that semen had come out. The basic principle concerning purity is that it is not rendered invalid unless there is something to prove that. 
An-Nawawi (may Allah have mercy on him) said: If a person is certain that he was in a state of purity and is uncertain as to whether it has been rendered invalid, then he is still in a state of purity because certainty cannot be cancelled out by uncertainty.
End quote from al-Majmoo‘, 1/331 
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said: If a person is certain that he was in a state of purity, and is uncertain as to whether it has been rendered invalid, then he should proceed on the basis of certainty. This is general in application and has to do with the things that necessitate ghusl or wudu. 
Then he gave an example and said: A man woke up and noticed some wetness on him, but he did not see an erotic dream and he is not sure whether it is maniy or not? He does not have to do ghusl when he is uncertain.
End quote from ash-Sharh al-Mumti‘, 1/190 
Based on that, your tawaf is valid and there is no blame on you for what you did. 
For more information, please see question no.  83025.