Yes. You can control your dreams. This is called Lucid Dreaming. It takes time to master the skills to lucid dreaming and everyone has different triggers. When I was a child, I was quite skilled at this, but as I've grown older, it becomes more difficult for me to do this.
As a child, I would control my dreams (make doors appear and make a milk crate appear--I used this to fly). Before slipping into a dream, I always knew how my dream would begin, however I could never control the middle of the dream, other than creating doorways/passages and my trusty milk crate.
There are many articles (and classes) on lucid dreaming. I would check out those.