All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
You have no right to take from the overtime wages except according to the time that you actually worked, and what is in excess of this, you should return it directly to the employer if you can do so, or indirectly if you fear any harm. As regards donating it while its owner is still available, then this is not acceptable.
Moreover, you should know that whoever possesses forbidden money he should donate it without the intention of charity because it is not his own money so that he may donate it in charity, rather he should give it out as a way of abiding by the orders of Allaah and he will be rewarded according to this intention and not according to the intention of charity.
Allaah Knows best.