If God (the true God, that is) can will the universe into existence, then He can will a Y chromosome into existence.
Incidentally, the LDS cannot explain how their "heavenly parents," who possess "bodies of flesh and bone," nevertheless produce spirit children.