Yes, you certainly can use KNN with both binary and continuous data, but there are some important considerations you should be aware of when doing so.
The results are going to be heavily informed by the binary splits relative to the dispersion among the real-valued results (for 0-1 scaled, unweighted vectors), as illustrated below:

You can see in this example that an individual observation's nearest neighbors by distance would be MUCH more heavily informed by the binary variable than by the scaled real-value variable.
Furthermore, this extends to multiple binary variables- if we change one of the real-valued variables to binary, we can see that the distances will by much more informed by matching on all of the binary variables involved than in nearness of the real values:

You'll want to include only critical binary variables- you are, in effect, asking "of all of the observations that match this configuration of binary variables (if any), which have the nearest real-valued values?" This is a reasonable formulation of many problems that could be addressed with KNN, and a very poor formulation of other problems.
#code to reproduce plots:
library(scatterplot3d)
scalevector <- function(x){(x-min(x))/(max(x)-min(x))}
x <- scalevector(rnorm(100))
y <- scalevector(rnorm(100))
z <- ifelse(sign(rnorm(100))==-1, 0, 1)
df <- data.frame(cbind(x,y,z))
scatterplot3d(df$x, df$z, df$y, pch=16, highlight.3d=FALSE,
type="h", angle =235, xlab='', ylab='', zlab='')
x <- scalevector(rnorm(100))
y <- ifelse(sign(rnorm(100))==-1, 0, 1)
z <- ifelse(sign(rnorm(100))==-1, 0, 1)
df <- data.frame(cbind(x,y,z))
scatterplot3d(df$x, df$z, df$y, pch=16, highlight.3d=FALSE,
type="h", angle =235, xlab='', ylab='', zlab='')