Flowers that have both male and female parts are called PERFECT flowers.
My initial answer was hermaphrodite. However, hermaphrodite is not only limited to flowers. It also cover animals which can produce both sperm and ova.
The correct term in reference to flowers that have both male and female parts is PERFECT flower. Sometimes, its called bisexual flower.