There is nothing wrong with saying in duaa': O Allah, accept from us our righteous deeds and there is nothing objectionable in this from a shari point of view. Rather the wording and meaning of this supplication are sound, because Allah, may He be glorified and exalted, accepts righteous deeds and does not accept bad deeds.
Allah, may He be glorified and exalted, says (interpretation of the meaning):
That Allah may reward them according to the best of their deeds, and add even more for them out of His Grace
They are those from whom We shall accept the best of their deeds
What is meant by the best of their deeds is their good, righteous deeds, because they are the best of what they do. They may do permissible things and other things, but the reward is only for good deeds, as Allah says (interpretation of the meaning):
So that Allah may expiate from them the evil of what they did and give them the reward, according to the best of what they used to do
Tafseer al-Sadi, p. 569
Moreover, when a person asks Allah to accept his righteous deeds from him, it doesn't occur to him that he may also ask Allah to accept his bad deeds from him; rather he says the word righteous to highlight the reason for acceptance, which is the righteousness of the deed, and this is correct linguistic usage in Arabic, for example in the verse in which Allah says (interpretation of the meaning):
And whoever invokes (or worships), besides AllÃ¢h, any other ilÃ¢h (god), of whom he has no proof, then his reckoning is only with his Lord. Surely! Al-KÃ¢firÃ»n (the disbelievers in AllÃ¢h and in the Oneness of AllÃ¢h, polytheists, pagans, idolaters) will not be successful
Al-Allaamah Muhammad al-Ameen al-Shanqeeti (may Allah have mercy on him) said:
There is no difference of opinion among the scholars concerning the fact that the words here, of whom he has no proof do not imply the opposite. It is not correct for anyone to say that if the one who worships another god alongside Him has any proof for that then there is nothing wrong with it, because it is impossible for there to be any proof for worshipping another god alongside Him; rather the overwhelming and definitive evidence indicates that there is only One Who is deserving of worship, and it is not possible for there to be any proof to justify worshipping anything else at all.
That is because this phrase of whom he has no proof describes reality, because they call upon the other god without any proof. So this is just stating the fact and it is not suggesting that there could be any proof because there is definitely no proof at all.
Another example from the Qur'aan is the verse in which Allah says (interpretation of the meaning):
Let not the believers take the disbelievers as Awliya' (supporters, helpers) instead of the believers,
[Aal Imraan 3:28].
This was revealed concerning some people who took the Jews as friends and supporters instead of the believers. The words instead of the believers is describing what really happened, and it cannot be interpreted as meaning that if the believers took some disbelievers as friends alongside believers, it would be acceptable, because it is well known that it is forbidden for the believers to take the disbelievers as friends and supporters in all cases. End quote.
Adwa' al-Bayaan, 5/364
To sum up, it is not permissible for anyone to speak about the religion of Allah without knowledge or insight, and thus take on a task that he is not qualified for, of which he has no knowledge, and stir up among the Muslims views that cannot be approved of by any scholar of shareeah. Rather what is required is to adhere to the Qur'aan and Sunnah and to teach the people the clear issues of Islam, and leave everything else to specialist scholars. The scholars are still using this supplication in their books and speeches, for example the speech of Shaykh Ibn Uthaymeen (may Allah have mercy on him) in which he says:
We ask You, O Allah, to accept our righteous deeds and to forgive our bad deeds. End quote.
Quoted from his website on the following link:
And Allah knows best.
Reproduced from Islam QA