Chart-topping singer Harry Styles is to star in a one-off show on the BBC in November, the broadcaster has announced.