Researchers show optical properties of metals can be tuned opening new route to programmable nanophotonic devices