Former England international Raheem Sterling has pleaded guilty to dangerous driving and nitrous oxide possession, facing potential prison time.