Is it okay to trim the toilet tank overflow pipe?
Not only is it ok, but Fluidmaster gives instructions on where and when to cut the overflow tube, as the follow photo shows.



Fluidmasters Article states the following:


  The most important part inside the tank is the flush valves "overflow pipe." The overflow pipe is the safety net for your toilet. When properly set it will prevent water from overflowing the tank and flooding into the home.


The four critical areas of a toilet tank are:


The Tank Lever Hole
The CL (Critical Level) Mark located on Fluidmaster's fill valve
The Overflow Pipe (top end)
The Water Level


The water level should be indicated by a mark or (depending of the age or use of the toilet) a water stain on the inside of the tank. When rebuilding a toilet it is very important to set the fill valve to achieve this height.