Undergraduate research field different from PhD field
You can definitely apply in a different field than your undergraduate. Some major fields of research don't even exist as undergraduate majors in most colleges (e.g., neuroscience), so it's understood that many students will come from different backgrounds.

The more similar your major is to the new topic, the easier the learning curve. If your major is significantly different you may want to take some post-bachelors undergraduate courses before beginning the PhD program to bring yourself up to speed.