Yes you may be able to, but there are a couple of things to consider. First, make contact with the HOA and let them know you would like to pay the balance at close of escrow. Second, be aware that some HOA's have the right to foreclose on your home due to delinquent fees.
In the last few years, we haven't worried so much about that as so many homes were in negative equity positions. However, as we have been moving into the place of positives in home values, there is more of a likelihood that an HOA would consider going after foreclosure to get paid.
As long as there is enough equity to clear any mortgages, attorneys, past dues, and then the costs to put it on the market and sell it....well, why the heck wouldn't they!?!?
So, this short post is to just remind you that falling behind on your HOA dues,
when you now have equity in your home,
could very well put you in a position to lose your home.