The 37-year-old midfielder, who was born in East London, this week stated his intention to leave the Los Angeles Galaxy at the end of the year.
Beckham stated he will depart Galaxy following the December 1st MLS Cup against the Houston Dynamo, saying he wanted "one last challenge" before the end of his playing career.
The Hammers have been one of a number of clubs linked with him since, while Paris St Germain and clubs in China and Australia are also thought to be keen.
The Sun quotes Allardyce as saying: "Yes, I would like to see a fit David Beckham at West Ham.
"But he would need to come and do a fitness test like any other player."