Constructing Stochastic Matrices for Weighted Averaging in Gossip Networks