Two weeks is definitely a quick close. Typically, the title work on both the buyer and seller sides will take less than a week to get done. The lender package (mortgage) which usually takes the longest, can be done in that amount of time also, but it'll take a working with your lender and your lenders close attention to walk it through the process to make sure it gets done.
I'm hopeful it all works for you!
It will be tight but it could be done. Ask your lender if they see a problem or not. The person handling the sale for HUD may counter your offer to move the closing date back if they can't get everything done on their end. It also will depend on what you offer, the lower the offer the more people who have to review it.