Bayesian Semiparametric Density Estimation via Basis Functions