You can always run an extension cord to it, but make SURE circuit is grounded (3 prong plug or similar depending on country) and ideally being run off a gfci outlet. 40 gallons can probably use a typical aquarium filtering system, like the ones that sit at the top of a tank with the wheel; fabricate a dowel rod to rest over a corner and attach to that, etc.. Or diy with your own set up. Plenty of diy videos online (search for "diy pond filter" and look for guys running a smaller set up) of small trash can set ups that'd be more than enough to filter out and add oxygen via surface water movement. Dunno if it'd be cheaper than an aquarium filter though at that size of your set up. If filtered, just keep the 3 gold fish. If they get too big, rehome them. One thing I'm finding out with minnows (got a few dozen bait shop fat head minnows for my pond about a month ago) is they spawn like crazy in warm enough waters. Of the 30 or so I got, maybe 5-10 survived the abrupt change from living in a sink their entire lives to a large pond. Of those 5-10, I have hundreds and hundreds of fry now. Some, apparently were "born" within the first week of the parent's arrival, going off their size now. Others are apparently still being created as I have fresh batches of newly "created" minnow fry almost every other day, so temps and conditions must be ideal for them right now. No idea how many will eventually populate my 15k+ gallon pond, but there is a lot. So dunno how others are managing to keep their numbers in check?