It's perfectly ok.
What the exam board will do is, like what happens when you start writing in the margins and on the non-scan pages or get an extra page added, actually physically send your paper to a marker rather than scan it. You might get docked some points, but frankly, I doubt it.
If it's really an issue for you, talk to your school exams officer and ask their advice on what to do about it. If they feel there's a problem they can make a fuss about it to the exam board.
If you want additional anecdotal evidence, my friend last year wrote every single exam in pencil last year- she came out with 8 A*s, so basically the message is, don't worry about it. Just focus on the rest of your exams, and walk around with about twenty pens on you at all times!