It realy depends on what type of plec you have, their diets vary greatly as there are thousands of types of plecs, i would personally not feed fish anything that contains sugar like fruit as the vast majority of tropical fish's digestive systems aern't built to handle sugars in any quantity, but thats just my feelings.
All plecs, even the algae eating types, need protein in their diets and this is very difficult to come by on veg based foods alone, especially as the plec grows bigger and the need for protein becomes greater, there are many high protein based foods you can buy but the main rule is don't feed them anything that contains fat(like red meat) and make sure the fish has the capability to eat it i.e not much point in expecting a 12inch long plec to pick up tiny half centimetre bloodworms.
Often the best and easiest high protein food you can feed your plec are prawns, just make sure they are de-shelled and drop them in the tank. It will take any plec a while to consume a whole prawn and any high protein foods are prone to messing up water quality so you should take the prawn out after a couple of hours or within the first day of putting it in and do a 10-20% water change with dechlorinator- you shouldn't need to feed an algae eating plec a prawn more than once a week at the most.
You shouldn't rely on plecs to live of algae already present in the tank as not all plecs eat the same type of algae, the easiest way to make sure your plec is getting the veg it needs is to buy regular algae wafers(contain all sorts of dead algae, don't worry your tank won't get algae if you drop one in the tank) or feed your plec blanced cucumber.