Fermion masses and phenomenology in SO(10) or SU(5) superstring compactifications