Is there more than one ideal seat post height based on type of riding? Assuming one has the correct frame size for one's height, can there be more than one perfect seat post height for the type of riding? I usually ride only in the city with traffic and less than 3 miles one way most of the time. 

But when I am doing longer rides I prefer to the seat post higher and my riding body said that there should only be one height- its either perfect or not.. 

I should say that my bike is an aero carbon road bike which I prefer to use even in the city but also on longer rides in the weekends about 25 miles or so.
Yes.  However, it varies by type of riding and conditions.  All Mountain is probably the extreme example of this (and the main market for dropper seatposts).  All Mountain bikes are designed to be able to climb and for that generally one would want the seat in a "high" position to be efficient.  During a technical descent, however, the seat is generally preferred to be low and out of the way, useful for providing additional movement if necessary, but low enough to get behind for extreme braking.  

Other riding types may have only one "ideal" position.  Trials bikes, for example, will most often have no seat, since it is rarely used and only adds weight and gets in the way.  So there is an "ideal" position.  Most road disciplines generally have what is considered an ideal position and will not vary by riding conditions in that discipline.