The US president said last month that Britain had been wrong to give the Chagos islands, which includes Diego Garcia, back to Mauritius. The islands had been at the centre of a decades-long diplomatic battle. Trump had earlier endorsed the accord.
The base was discussed in a telephone conversation between Trump and Starmer that Downing Street reported on late Tuesday.
"The leaders agreed their governments would continue working closely to guarantee the future operation of the base and speak again soon," the prime minister's office said.
Under the deal agreed in May last year, Britain will hand back the Chagos islands to Mauritius but keep the Diego Garcia base, jointly run by US and British forces, on a 99-year lease.
Trump lambasted the accord in a social media post last month.
"The UK giving away extremely important land is an act of GREAT STUPIDITY, and is another in a very long line of National Security reasons why Greenland has to be acquired," Trump said on January 20.
Starmer responded that the US leader's comments were an attempt apply pressure on him at a time when several European countries were resisting US claims to Greenland, a Danish territory.