Can I get a home loan if I owe the IRS money?
Not very likely. The IRS can file a tax lien and the tax lien would have priority over the real estate mortgage. Therefore, no lender will want to make a loan, knowing that the debt to the IRS may have to be repaid before the mortgage. A lender would typically ask you to pay off the debt to the IRS before making a loan to you. If you have a spouse with a good credit score and he/she is not in debt to the IRS, then perhaps that spouse can get the mortgage.
Even if you pay off the IRS, you might still have trouble getting a mortgage because the debt probably lowered your credit score a lot. Lenders take debts to the IRS and IRS tax liens very seriously. Sorry, but you're probably out of luck, at least with an institutional lender. A private lender might take a chance, though.