I recently bought a 15gallon fish tank and currently only have 2 goldfish and a ...
Very good question, but you are on the right track for your solution. Plecostumus are algae eaters and will clean algae off the glass and plants in a tank, but if there is no algae, they can slowly starve. Feeding them the algae pellets is the correct solution.
Since your goldfish have hearty appetites, they will try to consume all of the food they can find. Feeding them twice daily as much flake food as then can consume in about 3 minutes is adequate for them.
Plecostumus are actually very active at night. So when you are turning out the lights in your aquarium (and the room lights so it is dark) put some algae pellets in the tank, and your pleco will find them during the night. If it is dark, the goldfish will rest and not actively search for food. Monitor your pleco's growth to be sure he is eating enough. You can also supplement the feedings with nori sheets (algae) available at PetSmart - both the goldfish and pleco will eat that, as well as slices of fresh zucchini.