A part of the answer to this question can be found on Pink Floyd's website, specifically the site's timeline. The first two dates 1968 on the timeline are:
12 January 1968
Pink Floyd made their debut as a five-piece with Syd Barrett and David Gilmour at the University of Aston in Birmingham. This line-up performed together on at least three more occasions throughout the month.
26 January 1968
Pink Floyd played their first gig without Syd Barrett at Southampton University. They were supported by Tyrannosaurus Rex, featuring Marc Bolan.
So, from January 12th until some day before January 26th, Pink Floyd performed on stage at least four times as a quintet. It appears that none of these performances were recorded, as no bootlegs from that time period seem to exist.
The next date on Pink Floyd's 1968 timeline, February 1st, 1968, reads as follows:
1 February 1968
The band spent the day at Abbey Road studios working on what would become their second album, A Saucerful Of Secrets. Sessions had previously taken place with Syd Barrett and continued with David Gilmour throughout the rest of the month.
This seems to imply that sessions first began with Syd Barrett, but by the time they returned to the studio on February 1st, sessions went forward with only Gilmour. Checking Wikipedia's article for A Saucerful of Secrets, specifically the personnel section, Gilmour and Barrett both seem to have played on "Set the Controls for the Heart of the Sun". Clicking through to that song's Wikipedia article, the Lyrics and music section contains the following:
According to an interview with Gilmour on the 2006 documentary Which One's Pink?, the studio version of the song contained minor guitar work both from Gilmour and Barrett, making "Set the Controls for the Heart of the Sun" the only Pink Floyd song that features all five band members, though some listeners may not fully discern the guitar tracks as Gilmour's guitar is played through an amplifier that makes it blend in with Richard Wright's keyboards and organs, and Barrett's guitar effects first sound like groaning, then seagulls.
I found the documentary on DailyMotion and I was able to confirm that Gilmour said the first half of this. He doesn't say specifically which guitar parts were played by who. Assuming that Gilmour's guitar part mirrors Wright's keyboards and organs as he says, I'd imagine that Gilmour's guitar would have likely been added after the band had finished recording with Barrett. So it wouldn't be a stretch to say that it's quite possible that Gilmour and Barrett never actually appeared in the studio together during the A Saucerful Of Secrets recording sessions, and Gilmour seems to imply as much in the documentary.
Just to be thorough, I went through all of Barrett's solo albums on Wikipedia and couldn't find any that Nick Mason performed on. Roger Waters and David Gilmour produced Barrett's first album, The Madcap Laughs, and Gilmour and Richard Wright produced Barrett's second album, Barrett, but again, Mason doesn't appear on either one.
I should mention as well that the last time all five members were in the studio together was June 5, 1975, when Syd Barrett showed up unannounced while the band was finishing up mixing "Shine On Your Crazy Diamond" from the Wish You Were Here album. Apparently Barrett offered the band (who at first did not recognize him) to help out wherever they needed him, but evidently they didn't seem to take him up on his offer, so Barrett doesn't actually appear at all on the Wish You Were Here album. Keep in mind as well that if Barrett and Gilmour were never actually in the studio together during the recording sessions of A Saucerful Of Secrets, then this could have been the only time that all five musicians were in a recording studio at the same time.
- The band performed on stage as a quintet on at least four occasions between January 12 and January 25, 1968. None of these performances were recorded.
- The only song on which all five members played is A Saucerful Of Secret's "Set the Controls for the Heart of the Sun", and it's possible that all five didn't even work on the song at the same time (i.e. Gilmour's guitar was overdubbed after Barrett stopped recording with the band).
- The last (and possibly only) time that all five members were present in a recording studio together was during the sessions for Wish You Were Here, when on June 5, 1975 Barrett randomly showed up while the band was mixing "Shine On You Crazy Diamond".