All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
It is permissible for you to pray in the clothes that you are asking about; your prayer is valid, and you are not required to repeat it.
The aforementioned garments are judged to be pure. Doubt about the impurity of the contents of washing detergents should not be considered, for the basic principle with regard to things is that they are pure, and they are not judged to be impure except with evidence.
Shaykh Al-Islam Ibn Taymiyyah said in Majmoo‘a Al-Fatawa:
“All the jurists have agreed in a consensus that the basic principle about objects (things) is that they are pure.” [End of quote]
Allah Knows best.