Peas will work, but so will all sorts of veggies. Having long thick poop isn't really normal for goldfish. normal goldfish poo should be short fat chunks that breaks up in the water quickly, so you almost never see it attached to the fish.
Not having enough veggies is the #1 cause of constipation. Feeding veggies at least a couple times a week is a good idea.
Another reason may be temperature. Low temp will cause goldfish to get very constipated. Generally, you should not be feeding goldfish when the temp is less than 60. Some fancies will get gut problem when the temp is in the 60's. It is worth checking the temp, esp. for daily swings (and have a heater set on low 70's in cold climate).
The white thin poop may indicate an intestinal infection. However, I would give the veggies cure a try first before getting too excited. Esp. if the fish is otherwise normal.
80 gal FW with 30 gal DIY wet/dry/sump.
9 fancy golds, 1 hillstream loaches, 1 rubber-lip pleco (C. thomasi), 3 SAEs, small school of white cloud minnows, planted.