You absolutely can write a story with no dialogue. You also can write a story using only dialogue. You can and may do anything you wish in a work of fiction. That's what fiction is about. You have free rein. It is your story. And, importantly, it is a work of art. Would anyone have told Leonardo that he couldn't give the Mona Lisa that mysterious smile? Would anyone have told Picasso that he couldn't put both eyes on the same side of a person's head?
Many, many, many stories have been written without dialogue. Many great ones have done so very effectively. It is a stylistic choice. Whether you use dialogue or not depends on only one thing: Will it accomplish the effect you want?
Something that is becoming increasingly evident to me the more I read the questions posted here is that the number one absolutely most important learning tool for new writers is being shockingly ignored. And what, you may ask, is this astoundingly marvelous device that can so miraculously help new writers learn to write?
It is this: Other stories.
I can see now that so many new writers have read little or no published fiction. This is shocking to me. By far, the vast majority of writers, most especially the good ones, even more especially the great ones, would never have been successful if they had not devoured the world of fiction, and most of it, in fact, before ever picking up a pencil (to use an outdated metaphor). Most of them would never even have tried to write if they hadn't read tons of literature. If one has read a wealth of great stories, one can see the limitless possibilities inherent in fiction; in other words, you would already know that there is no reason you can't write essentially anything you can dream up. That is what fiction is about.
And if somehow you haven't read most of the greatest stories ever published in English, I am sad for you, because not only are you missing some of the greatest pleasures to be had on this planet, but you are also missing the best possible instruction you could ever receive in how to write. So go read. And read. And read. And read some more. And then write.