Justin Timberlake has just issued a formal apology for the "distasteful" wedding video that hit the Internet this week -- seemingly mocking homeless people -- and he's so serious ... he's forcing the guy who made it to do community service.

Justin apologized in an open letter on his website to "clear the air," calling the video that surfaced on the web -- in which real homeless people offer Justin their well-wishes for his wedding -- a "lapse in judgment." (excerpt below)

Justin says the video was NOT actually shown at his wedding, and insists he had NOTHING to do with its creation, but writes, "I am deeply sorry to anyone who was offended by [it]."Read more: http://www.tmz.com/2012/10/26/justin-timberlake-apology-wedding-video/#ixzz2AY1avJnL