Obama pledges transparency over spy programme