On the face of it they cannot do this if the reason is because of your pregnancy or pregnancy related illness regardless of what your contract says. If your contract sets out hours, or there is a custom and practice of the hours you usually work, then your position is stronger but it is not disastrous if there is nothing about hours, or if you have no contract at all.
If you can show facts from which an inference of sex discrimination can be drawn it is for them to disprove that the reason for their behaviour was discriminatory.
At this stage I would recommend that you raise a formal grievance about your treatment and ask why they have done this, stating that you are concerned that this will impact on your maternity pay (you need not necessarily state you believe that this is pregnancy related at this stage if you would prefer not to, although if you do it will put you in a stronger position if you later decide to go ahead and sue). If you do not like the answers then I would be considering raising a sex discrimination questionaire which they will have to answer or again run the risk that at a later stage a tribunal will draw an inference of sex discrimination against them.
In the meantime carry on working the hours they offer, but also thinking practically I would recommend you also think about looking for another job (I know this is unfair but if they appear to be discriminating against you it is likely that they are and it will only get worse.)
I would also strongly recommend you try and get some rl advice, from the CAB, or a solicitor. Some of us do give advice for free, and others may give advise if you have insurance to pay the costs (check you mortgage and any insurance policies you have).
Good luck and post if you have any more questions