If you need it, it's safe. I fortunately don't usually need a nebulizer, just my inhaler, but the medicine is pretty much the same. I know plenty of people who've used nebulizers during pregnancy. But more importantly, it's better to do whatever you have to do to take care of yourself. A bad chest infection would be more dangerous during pregnancy than treating it, whatever the medicine. But yes, if it's just albuterol anyway, it's definitely safe.