Laugh at yourself a bit, but know that nobody else has the right to laugh at you.
I was exactly the same way back when I was your age (and still am, to some extent). My main issue was music; since my favorite genres were jazz and classic rock, I was fairly out of touch with the music of the time. I could tell you a lot about Dire Straits, for instance, but not much about Madonna (to use your example).
It took me a while to get used to this. I was happy in my little bubble of older and non-mainstream music, books and culture. I came to one realization, though: The only way to avoid this problem completely would be to change. And that's something you should never feel pressured to do.
It was around the time of this realization that I finally owned my lack of pop culture knowledge. If someone asked whether I had seen the latest Avengers movie, I'd shrug and say
Well, I'll be honest, modern superhero movies aren't my thing! How was it? I don't know much about the franchise.
If I was close with the person, sometimes we'd laugh, and then they'd tell me about the movie, which always ended well. It seemed to work even better if the person was passionate about the movie/song/etc. There were several important things:
- I acknowledged that my expertise in the area was, to put it one way, lacking.
- I took it in good spirits. Maybe others see this as embarrassing, but it's just a quirk of your life. It's humorous at times; laugh about it.
- I showed that I cared. Obviously, you want to know about these popular culture references; demonstrate that my keeping the conversation going even when you choose to ask.
Dealing with mockery
I think you have two questions, to be honest:
- How do I solve the problem of not knowing about the reference? (The practical problem)
- How do I avoid being mocked for it? (The social problem)
I discussed the first one before; I'll talk about the second one now.
You mentioned that you've been in cases where you were mocked for being a "nerd". I sort of reappropriated that pejorative term and took pride in it, but you might not want to do so. If that's the case, I'll give you the following bit of advice:
Shrug it off.
I said before that you shouldn't be pressured to change. If someone thinks you're a worse person for not liking the "cool" bands or the "popular" movies, then they can, quite frankly, go jump in a lake. Either they accept you for being you, or they don't, and you can't change their minds. You shouldn't change just to fit in better; your true friends will accept you for who you are.
I say this to try to give you confidence. I have never been a very confident person; in high school, that was a major weakness for me. But I owned the label of a "nerd". I thought to myself, "The songs and movies and books I like are no less valid than the ones the next person likes." Other people might laugh, but they have no reason to do so. Your choices, your likes, your passions are just as valid as theirs.
Let me add one last note: Things are going to change over time. My music tastes - to continue my earlier example - have expanded a bit; as I became a fan of some modern alternative groups, I learned more about the modern music scene1. You're going to grow and change, and while you probably won't ever completely grow out of this issue, and shouldn't feel pressured to, it might get better.
1 This didn't stop me from also growing to like older music, like certain traditional genres.