The relationship between a research supervisor and student is a relationship between consenting adults. While local cultures may differ somewhat between institutions, the general rule in academia is that you may change supervisors if doing so will advance your own training and professional objectives.
Indeed, changing early --- before the research relationship has even properly begun --- is the best time for everyone concerned. A supervisor/mentor could legitimately be annoyed, or worse, if you leave after s/he has invested substantially in you, and still has little to show for it.
There are at least two important questions to consider, however: whether you should change supervisors, and how you go about it.
On whether: the best source for information about supervisors is the community of other students, especially those further along in the program, including especially those who are current or former supervisees of your prospective mentor. If it is possible to do so, try first to contact some of these students and ask, "What is Dr. X like to work for? Any problems?" Do your research first, before switching.
On how: Mentors are human beings, too, and may not enjoy a perceived rejection. So: first make absolutely sure you have the new mentor's approval to join their group. Then, let the old mentor know. If possible, have this conversation in person, not via email. Emphasize the new mentor's research interests and how they match yours; even if part of the reason for the switch is the old mentor's shortcomings, you need not emphasize those unless pressed.