It doesn't seem at all likely, although we can't rule it out.
This scenario never presents itself in canon so we can't tell whether or not it would be permitted. The only student who changes their O.W.L. subjects after picking them is Hermione, who drops Muggle Studies and Divination. However, we don't hear about anyone asking for permission to take O.W.L.s that they hadn't studied for, or about anyone actually attempting such a feat. (There is one possible example, which I discuss below, but I don't think it's really a credible one).
It seems doubtful that taking O.W.L.s in this fashion would be permitted, largely because the process for picking O.W.L.s is so intimately connected with picking the subjects you're going to study at Hogwarts. The two go together.
O.W.L. subjects are chosen in second year.
The second-years were given something new to think about during Easter holidays. The time had come to choose their subjects for the third year, a matter that Hermione, at least, took very seriously...In the end, [Harry] chose the same new subjects as Ron, feeling that if he was rubbish at them, at least he'd have someone friendly to help him.
(Chamber of Secrets, Chapter 14, Cornelius Fudge).
These subjects are, with the sole exception of Hermione, the subjects that are taken at O.W.L. level by fifth-years. This is partly why Hermione takes her choices so seriously.
"It could affect our whole future," she told Harry and Ron, as they pored over lists of new subjects, marking them with ticks.
(Chamber of Secrets, Chapter 14, Cornelius Fudge).
The selection of O.W.L. subjects is never brought up again, which strongly suggests that after the choices are made in second year that students can't add extra subjects onto their exam schedule. If anyone were to attempt to do this then it would be atypical of the usual process of picking O.W.L.s.
A similar process is in place for the picking of N.E.W.T. subjects, which is likewise tied to the students picking which subjects they want to study at Hogwarts.
The distribution of timetables was more complicated than usual this year, for Professor McGonagall needed first to confirm that everybody had achieved the necessary O.W.L. grades to continue with their chosen N.E.W.T.s.
(Half-Blood Prince, Chapter 9, The Half-Blood Prince).
When the exam timetables come out they seem to be dictated to the students. There doesn't appear to be any room for wrangling or trying to take up extra subjects at the last minute. McGonagall gives them their schedules and the students accept them.
They received their examination timetables and details of the procedure for O.W.L.s during their next Transfiguration lesson.
"As you can see," Professor McGonagall told the class as they copied down the dates and times of their exams from the blackboard, "your O.W.L.s are spread over two successive weeks. You will sit the theory papers in the mornings and the practice in the afternoons. Your practical Astronomy examination will, of course, take place at night."
(Order of the Phoenix, Chapter 31, O.W.L.s).
It is possible, I suppose, that a determined student could bypass their teachers and apply to take an exam themselves since the O.W.L.s aren't actually run by Hogwarts but by the Wizarding Examinations Authority.
The only evidence we have that extra O.W.L. exams may have been taken comes in the form of Hermione's results. In first editions of Harry Potter and the Half-Blood Prince Hermione was stated to have received eleven O.W.L.s, despite only studying ten subjects at Hogwarts. This would be consistent with her taking an O.W.L. like Muggle Studies that she hadn't actually studied at Hogwarts during her fifth year. However, this statement seems to have been an editorial oversight that was quickly adjusted for subsequent editions.
Publishers have been forced to correct an error in one of JK Rowling's Harry Potter blockbusters.
The hardback edition of the sixth instalment of the schoolboy wizard's adventures, Harry Potter and the Half-Blood Prince, said that swotty Hermione Granger had scooped 11 top results in her Ordinary Wizarding Levels (OWLs). But hawk-eyed readers spotted that in the previous book, Harry Potter and the Order of the Phoenix, she had only taken 10 subjects.
Publishers quickly fixed the discrepancy in the next edition, downgrading her results from one "Exceeds Expectations" and ten "Outstanding" grades to nine "Outstandings" and one "Exceeds Expectations".
The change in the Harry Potter books was reported on fan site www.mugglenet.com.
A spokeswoman for publishers Bloomsbury said that the error had been spotted last year and quickly fixed.
"In book six it said 11 and book five it said 10," she explained.
"It was corrected immediately."
("Potter Book's OWL-ing Error Fixed", The Yorkshire Post, 2nd September 2006).
The fact that Hermione's phantom O.W.L. was edited out of the book and that her results were "fixed" by the publisher refutes the idea that she took extra O.W.L.s. Indeed, it makes the case all the more strongly that requests for additional O.W.L.s would not be considered by Hogwarts or the authorities since the prospect of Hermione gaining more O.W.L.s than she studied for was immediately shot down by Rowling and her publishers.
All in all, it's highly unlikely that students would ever take exams for O.W.L.s they hadn't studied for since the selection of subjects and the assessment of subjects by O.W.L.s go hand-in-hand. There's no announcement that such an arrangement is expressly forbidden, however, so we can't rule it out.