The Hurtigruten coastal ships make an overnight run from Bergen to Alesund. They depart Bergen at about 8 PM (2000) and initially dock in Alesund around 8 AM, I think. The ship then makes a long detour into the Gierangerfjord before returning to Alesund around 8 PM that night. I doubt that there's a super-late flight from Alesund to Oslo that would get you back to the capital that same day, but you can check on skyscanner.com to see. The other issue is that this year the ships weren't running seven days a week even in the summer. [See Badger's post below; the Geirangerfjord detour is not year-round.]
As you know, there are also daytime excursions into the fjord, but I don't know their schedules or point(s) of departure. It appears you are ahead of me on this since you know the boats don't run every day of the week at the time of year you are traveling. (Please clarify your dates; as already noted, there is some confusion there.)
The Geirangerfjord is lovely, but it is arguable whether it is prettier than the Naeroyfjord arm of the Sognefjord. The latter is accessible as part of the Norway in a Nutshell trip that many people use to travel between Oslo and Bergen. A variant of that trip can be made as a round-trip from Oslo, not going all the way to Bergen. October isn't peak season, so some elements of the trip may not run as frequently as they do in mid-summer, but there's a good chance you can accomplish this on the full day you have in Norway:
Regular train from Oslo to Myrdal (https://www.vy.no/en)
Flamsbana scenic train from Myrdal down to Flam (https://www.vy.no/en)
(Book the outbound train ticket all the way from Oslo to Flam with a change in Myrdal.)
Fjord boat from Flam to Gudvangen (https://www.norwaysbest.com/things-to-do/fjords/fjord-cruise-naeroyfjord/)
Bus from Gudvangen to Voss
Regular train from Voss back to Oslo (https://www.vy.no/en)
You can book all the major components separately in advance, just buying the Flam-Gudvangen bus ticket from the driver as you board, but the NorwaysBest folks sell packages at a mark-up. That might be easier since you are traveling soon (assuming your trip is this year).
Things to be aware of: short daylight hours in October and weather challenges. The round-trip from Oslo to Flam/Gudvangen/Voss is a long one; I believe it would be somewhat dark if not totally dark during the early and late parts of the trip (the train rides) even if you were very lucky with the weather. This is not an inexpensive excursion, no matter how you pull it off. The weather may very well be overcast and/or rainy; western Norway gets a great deal of rain. If the weather isn't good, views will be negatively affected. I have no comparable data for Flam, but October is the rainiest month of the year in Bergen (over 10-1/2 inches of rain, with rain falling nearly 2 out of every 3 days).