Definitely possible, I believe that your written lasts for up to 24 months after the date you take it. So theoretically you could do all of your ground classes, pass the written and then do your flight training. I would caution somewhat against doing solely book work before attempting your flight training. A lot of the material makes a lot more sense when you see it in action.
Again, my opinion and take it for what it is worth, if you want to hit the books hard and attempt the written before you start flying full time then try to get a flight in once a week or even once every two weeks so you can apply what you're learning and see it in action. This can also be accomplished by 'sand bagging' along on other students flights.