hi there, you have most probabely anal fissures along with piles which is the reason for the pain while passing stools. It is a vicious cycle when the pain prevents you from evacuating properly which in turn leads to constipation
and hard stools causeing pain and fissures. You need to visit a doctor and get local anaesthetic
gel prescribed whicj can be applied 10 min before passing stools so that the pain eases and it is easy to evacuate your bowel. As you are already taking high fiber diet and plenty of fluids once your bowel movements are regular then these problems will cease and the fissure will heal. If this does not relive your problem then let the surgeon decide whether you need to go for a dilatation procdure as you might be having a tight anal sphincter. Non veg food does make constipation worse but you need the condition to be treated rather than avoid certain food. take care.