EXCLUSIVE

Good news for Aldon Smith ... the Oakland Raiders star is officially engaged -- and it all went down right in front of Joe Montana!

The embattled NFL star took his girlfriend, Shawna McKnight, out to Restaurant Gary Danko in San Francisco -- one of the fanciest spots in town -- for a Valentine's Day dinner ... and they happened to be sitting right next to the 49ers legend.

During the meal, Smith dropped to his knee and busted out a fat ass diamond -- and popped the question right in the middle of the restaurant!

FYI, she said, "Yes!"

McKnight -- who's a personal trainer -- tells TMZ Sports she's only been dating Smith for about 4 months but they fell madly in love quickly and they're excited to get married.

As for a wedding date, McKnight says they haven't picked one yet -- their priority is to make sure Smith (who's currently suspended from the league) gets reinstated as soon as possible.