How can ophthalmia neonatorum be prevented from occurring after delivery in a newborn born to a woman with untreated gonococcal infection?