In India, you are likely to be constantly under attack by agonised human beings - mothers with infants in their arms, small children, disabled, lepers and others. It is often difficult to turn a blind eye. More often than not, I would suggest ignore, harden yourself, say no firmly and walk away. But maybe sometimes you might want to give in to the tug of your heart - especially with the young children and the infirm. Keep small change for those occasions. If you are surrounded by many, again, be firm and say no.
It is true that most beggars are part of organised begging rings. So instead of money maybe you can ensure that a child gets one square meal a day. It isn't really much; the child doesn't go hungry and you will walk away feeling good.
So, my advice, look at each situation and decide how to deal with it. One thing I try and follow, if someone is providing a service - such as cleaning vehicles at the traffic junction, selling newspapers - I "buy" the service from them and give them a little more than what they expect (pay Rs 5Rs 5 for a newspaper if the paper actually costs Rs 2Rs 2).
I would not say it is "unsafe" to give. As in any other country, it is always good to be cautious.