Learning Optimal Resource Allocations in Wireless Systems