Question: I was raised Catholic but there are things I don’t believe any more, like praying for the dead and praying to Mary. Jesus is the only way to heaven. Can I attend Mass?
Yes. Actually, anyone can attend mass. Non-Catholics and even non Christians can attend Mass. All are always welcome and encouraged to come even out of mere curiosity.
I believe however, you are actually asking if you can receive communion. While the reception of communion is up to each individual, I would encourage you to think about this carefully. By receiving communion you are stating that you believe in all the elements of the creed. If there are things in the creed that you don’t believe, then that’s a good sign that you should not present yourself for communion because in essence you would be being untruthful.
Here’s more on what the Eucharist means to Catholics:
Lastly, with regards to your last statement, Jesus is the only way to heaven but other denominations do not believe in the true presence of Jesus in the Eucharist as Catholics do. It sounds to me like you believe in the true presence that we have in the Eucharist but don’t believe in some other things. Perhaps there is someone you can talk to (e.g. a priest or a lay minister at your parish) about those things that you are having trouble believing. You may be misinformed about a few things regarding Catholics and their view of Mary. Or you could be confused about why we pray for the dead (we’re not trying to change God’s mind, for instance). So look into these matters and come to a greater awareness about what we as Catholics believe before you decide that you are no longer in communion with the Catholic faith.