O.W.L.s are not given by Hogwarts; they are given by an external body, the Wizarding Examinations Authority. If a Beauxbatons student would transfer to Hogwarts for sixth year, the problem would not be how to take the examinations; rather, the problem would be how to attend classes. Sixth year classes require certain O.W.L. grades as a prerequisite for attending. If the transfer student hasn't taken the O.W.L.s he would be lacking the prerequisite and presumably be unable to attend class.
I would think it unlikely that the Wizarding Examinations Authority would conduct exams for an individual student. So unless the transfer students came at the end of the previous year and took the O.W.L.s they would probably be unable to take them prior to attending sixth year classes.
There are several options for what could then occur:
- Perhaps someone at Hogwarts (the professor of each class?) would personally examine the transfer students to see whether they are sufficiently advanced to attend sixth year classes, even without having taken any O.W.L.s. If this is the case then there would be no further need for the transfer students to take O.W.L.s. If they are planning on returning to Beauxbatons then they could just take the examinations there when they return. If they are planning on staying at Hogwarts it might depend on what N.E.W.T. classes they take. While various professions require a certain O.W.L. grade, it would stand to reason that if you had a N.E.W.T in that subject it would be at least as good as an O.W.L. If not, or if the transfer students weren't taking certain N.E.W.T classes, they could presumably just take the O.W.L.s at the end of the year with the current fifth years.
- Transfer students would not be permitted to take sixth year classes without O.W.L.s. As such they would have to be demoted to fifth year and take the O.W.L.s at the end of that year in order to progress, or simply delay transferring to Hogwarts until taking the O.W.L.s.
- Perhaps transfers after fifth year from Beauxbatons to Hogwarts are simply not allowed.
Essentially, we don't really know what would happen. In the related question of whether there are transfers in the first place, the only potential case of transferring to Hogwarts mentioned in any of the answers (full disclosure: I am the author of that answer) is a case that would have occurred prior to fifth year where this issue would not have come up.