Can subjects studied in Master and PhD be different?
There is a self-evident answer, - yes, it's possible, no any official restrictions, no one care (maybe, except your advisor). 

And there are obvious consequences when you're changing the research topic - you're starting something new with less experience. This can be good or not, and this is your, and only your decision.