Although it is not usually advisable to use any kind of antibiotics during gestational period, there are some drugs that could be given with special consideration. So, I suggest to consult pediatricians and clinical pharmacists working on the field.
antibiotics really have no correlation with immunity of fetuses they are primarily for fighting of infection, some antibiotics are safe in preg such as the cephalosporins and penicillin based antibiotics. Quinolones aminoglycosides are a NO