As a twin who feels very strongly about being a distinct individual from my sister, who I do not even usually refer to as my twin - it's fine.
Please don't stick them in a single package with one tag and both names. But otherwise, it's fine.
I have great childhood memories of parties where my mom hosted about a million little kids, baked and decorated two (very different) cakes, and we opened up presents that were basically matched sets. It never bothered me. Plus, I could always snitch the head off her Barbie if the dog ate the one off mine. Not that I ever did that.
It's pretty standard parenting advice that if a toy is nifty, it's nice to have one for each kid and that the more similar those items are, the easier it will be to defuse conflict over them. I researched parenting advice as part of my master's thesis, and it's one of the few things that showed up in Watson, Gesell, Spock, and Leach as advice for dealing with sibling rivalry. Once kids are old enough to walk, and talk, their conflicts can be much more intense. We've had wikistix in my house (multiple sets for multiple kids). Wikistix are cool. They are open-ended creative toys that many people have never heard of, and that unique individual children will use in unique individual ways.
I don't think it's treating children as a unit to give two children who are the same age the same present. My kids sometimes get the same gifts as their cousins (and sometimes get gifts their cousins are super-jealous of - not a HUGE issue if the cousins go home in an hour, but a twin is like a cousin who never goes home, no matter how cranky you get with them). And when I find a cool, inexpensive toy for the age group, I have sometimes sent it as a gift to the birthdays of multiple children in my kids' classes. When you know them better, you can individualize. However, at age 5, an invitation to a party is often not an indicator of a close personal bond between your child and the party hosts, and preschool b-day gifts are not expected to reflect deep insight into the personality, preferences, or even clothing sizes of the recipients.
It's not nice to give twins a gift they have to share. It's horrible to assume that they are basically the same person in two bodies. But giving two kids the same toy is not doing that. It's getting two. Their close family will know their personalities well and will gift accordingly, as will you, should you get to know them better.