Another possibility, just using ifelse instead of cut.
ifelse
cut
d + stat_density2d(geom="tile", aes(fill = ..density.., alpha = ifelse(..density.. < 1e-5, 0, 1)), contour = FALSE) + scale_alpha_continuous(range = c(0, 1), guide = "none")
This seems to work:
d + stat_density2d(geom="tile", aes(fill = ..density.., alpha=cut(..density..,breaks=c(0,1e-5,Inf))), contour = FALSE)+ scale_alpha_manual(values=c(0,1),guide="none")