Optimal Learning by Experimentation