Dynamical quantum phase transition of a two-component Bose-Einstein condensate in an optical lattice