Data-driven distributionally robust optimization using the Wasserstein metric