While applying for PhD in Deep learning, how useful are papers in some other topics like photonics?
You can specialize later on, any research experience you have is definitely a plus. Here's an untold secret, researchers will often switch between subjects throughout their careers (depends on the field and the researcher, some choose to focus on a very narrow field). This means, that it is not uncommon for researchers to begin writing about a completely new subject that they have very little knowleage of simply because they received funding to investigate that topic.
That's a long winded way of saying, don't sweat it. Your previous experience is not useless. It certainly won't hurt if you can author (or co-author) a paper in deep learning.