Ultrafast all-optical switching in the presence of Bloch surface waves