Nanoscale all-optical devices based on surface plasmon polaritons