Study of D∗ (2010)± production in ep collisions at HERA