Did you enable Find my iPhone in Settings - iCloud? If so, go to www.icloud.com/find on a computer. Login with your iCloud ID and password.
At the top of the browser window, you'll find "All Devices". Select it, then select your iPhone, and click "Erase ...".
At the top of the browser window, you'll find "All Devices". Select it, then select your iPhone, and click "Erase ...".