Is it okay to try to have a baby even though being I am infected with genital herpes?

Yes. Yes. There is a risk of transmission to the baby during pregnancy but this is very low. The greatest risk for transmission is during a vaginal delivery if there are any active lesions (during an outbreak). You would be placed on medication to take daily to help prevent an outbreak. If active lesions are present, your OB might recommend cesarean delivery.
Yes. Newborn infection is most likely if the primary herpes infection occurs during the last weeks of pregnancy with active lesions. Infection rates up to 30% are cited but this drops to around 5% for those with recurrent outbreaks.This can be avoided with antiviral suppression of outbreaks and a planned c-section prior to active labor.