I'm writing most of my book in third person omniscient, but I think it would be better if I put the last few chapters in first person, that way the readers can better understand what's happening at that moment. Would it be okay to do this, or should I keep a consistent narration throughout?
You can do anything if you can get away with it, but a shift in point of view is always tricky, and one that large is particularly so. Worst of all, it comes near the end. That means the reader is expecting the constant use of third person omniscient. There is no pattern.
More first-person sections earlier could establish a pattern of switching, but of course require something to say.
This is completely okay, as long as you do it right. First you should finish up your first person POV, maybe even at the end of a chapter or a cliffhanger, right before Bob hurls himself into the reactor core to overload the death star and save the galaxy, or at the start of a very fast paced and complicated scene or whatever else you need a POV change for.
Then you need to make it clear to the readers that the POV is changing. Don't say that the POV is changing, just put an extra line break or something that you can keep constant with any more POV changes.
Now that it's third person omniscient, you can just write it out and then when you need it switch back to first person POV using the method you decided on above. If you decide to end your book in third person, I don't think you need to do you line break switch at the end of this book or the beginning of the next book. If you end the third person at the end of a chapter, then you should probably put the line break switch although you could probably do fine without it.
"Jacob hurled himself off the [indoor] balcony and towards the bottom floor. 'here goes nothing,' he mumbled as he fell down, knowing that he may never come back up.
"The wind was strong, very strong. I could feel it blowing in my face as I fell down into the abyss. Looking down now, I wasn't sure if I'd ever make it back up. Far below me I could see Overlord Pai...
That was my pathetic and horribly written attempt at an example, but it's an example nonetheless. See how it switched POV's in a smooth and almost unnoticeable way? If you can pull something like that off than you can easily do this. It isn't breaking any rules, and your readers won't be confused if you can pull this off as/more smoothly as I did. (Mine honestly was not that smooth. Try to make it better than mine if you can. Although I think using one like mine would work without causing confusion, it would probably just sound a lot better if you did one better than mine).
If you can't pull it off smoothly, either don't switch POV's or study so that you can. It's less work for you and for your reader.