The "key.xtickfun" argument is what you want. Pass a function to this argument that returns a named list whose elements will be passed to the "axis" function.
In the function, I get "breaks" from the parent frame (the gplots environment), make them pretty, and keep only the first and last break, which are the min and max. Then, return a list with "at" and "labels". "at" is the values returned from the scale01 function (also from the parent frame) called on the breaks. "labels" are the labels, which should be the breaks themselves.
heatmap.2(matr, trace="none", density.info="none",
key.xtickfun = function() {
breaks = pretty(parent.frame()$breaks)
breaks = breaks[c(1,length(breaks))]
list(at = parent.frame()$scale01(breaks),
labels = breaks)
})