ODesk does not have a tool or mechanism for transfering work diaries between different contracts.
Take screenshots of the work diaries in question.
Delete the work screens and times fro the contract they were wrongly logged to.
Make sure that the client you originally logged the time to is not billed for that time.
Send a message to the other client, the client for whom you actually did the work. Send the screenshots you took of your oDesk work diary interface, showing the work you did for him.
Ask the client if you may log manual time for this work.
(This was the advice that I was given by Customer Support when the same thing happened to me. This worked for me, and I was paid in full. It IS an embarrassing mistake, but you are not the first person who has done this. Just be honest and transparent with your clients about what happened.)