The Nuggets announced the deal Friday.
Allen played in 49 games for Milwaukee last season, averaging 3.2 points and 2.1 rebounds.
In 409 games over an eight-year career, he has averaged 5.4 points and 3 rebounds. He also played for Miami, Charlotte, Chicago, New Jersey and Dallas.
Sharpe came to the Nuggets in a July 13 trade after spending his rookie season in Detroit, where he appeared in eight games and averaged 1 point.
Weems appeared in 12 games for the Nuggets last season, averaging 1.6 points.