Sa'id bin Asim (may Allah have mercy on him) said: When someone came to Sayyiduna Abu Bakrah (may Allah be pleased with him) to make him a witness, he would say: "Take someone other than me as a witness, for the Muslims have declared me a sinner." This, if authentic, is because he did not repent from it after the accusation but persisted in it; had he repented, the charge of being a sinner would have been removed from him, and Allah knows best.
Imam al-Shafi'i (may Allah have mercy on him) said: Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) states that the testimony of the slanderer is accepted after repentance.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الشهادات / 20548